package com.hh.test.design.factory;

public class SimpleFactory {

	public Operate createOperate(String type) {
		if (type.equals("add")) {
			return new OperateAdd();
		}
		return null;
	}
}

interface Operate {
	public int ope(int value, int value2);
}

class OperateAdd implements Operate {

	@Override
	public int ope(int value, int value2) {
		return value + value2;

	}

}
